package com.xxk.rocket.star.core.client.impl;

import com.alibaba.rocketmq.client.consumer.DefaultMQPushConsumer;
import com.alibaba.rocketmq.client.consumer.MQConsumer;
import com.xxk.rocket.star.core.client.AbsProcessClientConsume;
import com.xxk.rocket.star.core.dto.StargateMapperDTO;

public class MapperProcessClientConsume extends
        AbsProcessClientConsume<StargateMapperDTO> {

  @Override
  protected void processConsume(StargateMapperDTO stargateMapperDTO,
                                MQConsumer mqConsumer) throws Throwable {
    DefaultMQPushConsumer defaultMQPushConsumer = (DefaultMQPushConsumer) mqConsumer;
    defaultMQPushConsumer.subscribe(stargateMapperDTO.getTopic(), stargateMapperDTO.getTag());
  }
}
